# -*- coding: utf-8 -*-
"""
# @Time    : 2021/1/8 下午6:27
# @Author  : tgy
"""


def test01():
    ...
    x, y = (1, 2)
    print(x,y)
    x, (y, z) = [1,(2,3)]
    print(x,y,z)
    # 忽略掉一些不关心的值
    x, (_, z) = [1, (2, 3)]
    print('{x},{z}'.format(x=x, z=z))

    user_message = 'tgy123:x:1000:1000::/home/tgy123:/bin/bash'
    uname,*_,home_dir,bash = user_message.split(':')
    print(f'uname:{uname},home_dir:{home_dir},bash:{bash}')


def sum(items):
    head,*lasts = items
    return head + sum(lasts) if lasts else head

if __name__ == '__main__':
    ...
    test01()